package com.dataextend.mapper.master;

import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ClickhouseMapper {

    List<JSONObject> actMissionAnalysis(@Param("missionid") String missionid);

    List<JSONObject> regularMissionAnalysis(@Param("missionid") String missionid);

    List<JSONObject> listClickhouse();
    int firstDay(@Param("firstSearch") String firstSearch);
    int afterDay(@Param("afterSearch") String afterSearch);


    List<JSONObject> userGroupAnalysisByAct(@Param("userActSql") String userActSql);

    Integer userGroupNumByAct(@Param("userActSql") String userActSql);


    // 从es查的userid明细写入clickhouse
    void rulesSaveUserList(@Param("saveSql") String saveSql);

    // 删除clickhouse中的userid
    void truncateUserList(@Param("truncateSql") String truncateSql);

    // clickhouse 查询事件分析模型
    List<JSONObject> eventAnalysis(@Param("searchCondition") String searchCondition);

    // clickhouse 查询转化漏斗分析模型
    List<JSONObject> hopperAnalysis(@Param("searchCondition") String searchCondition);

     // clickhouse 查询分布分析模型
    List<JSONObject> distributeAnalysis(@Param("searchCondition") String searchCondition);


}
